@extends('admin.layout.basic')
@section('content')
        <!-- 面包屑 -->
@include('admin.layout.breadcrumb')
<div class="wrapper wrapper-content animated fadeInRight ecommerce">

  <div class="row">
    <div class="form-group">
      <div class="col-sm-8 col-sm-offset-2">
        <div id="com_message"  name="com_message"  class="text-danger text-center" ></div>
      </div>
    </div>
    <div class="col-lg-12">
      <div class="ibox ">
        <div class="ibox-title">
          <h5>{{trans("admin/message.sys_email_title")}}</h5>
        </div>
        <div class="ibox-content " id="post_content_div">

          <div class="row">

              <fieldset class="form-horizontal col-sm-6">

                <div class="form-group">
                  <label class="col-sm-3 control-label">{{trans("admin/message.sys_email_brand")}}</label>
                  <div class="col-sm-8"><input type="text" name="name" class="form-control"  value="{{isset($mailconfig) && isset($mailconfig['name']) ? $mailconfig['name'] : ''}}" >
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-3 control-label">{{trans("admin/message.sys_email_send_host")}}</label>
                  <div class="col-sm-8"><input type="email" name="email" class="form-control"  value="{{isset($mailconfig) && isset($mailconfig['email']) ? $mailconfig['email'] : ''}}" >
                  </div>
                </div>
              </fieldset>
              <fieldset class="form-horizontal col-sm-6">

                <div class="form-group">
                  <label class="col-sm-3 control-label">{{trans("admin/message.sys_email_note")}}</label>
                  <div class="col-sm-8"><input type="text" name="notemail" class="form-control"  value="{{isset($mailconfig) && isset($mailconfig['notemail']) ? $mailconfig['notemail'] : ''}}" >
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-3 control-label">{{trans("admin/message.sys_email_note_list")}}</label>
                  <div class="col-sm-8">

                    @foreach($mailnotes as $item)
                        <div class="i-checks"><label> <input name="{{$item['name']}}" type="checkbox"  @if(isset($mailconfig) && isset($mailconfig[$item['name']]) && $mailconfig[$item['name']] == 1) checked @endif > <i></i> {{$item['title']}}</label></div>
                    @endforeach

                  </div>
                </div>
              </fieldset>

        </div>
      </div>

    </div>
    <div class="col-lg-12 " style="padding-bottom: 40px">
      <div class="col-lg-12   text-center">

        <button type="button" onclick="emailManger.saveMessage()" class="btn btn-w-m btn-success">{{ trans('admin/message.submit') }}</button>
        <button type="button" onclick="emailManger.openModel()" class="btn btn-w-m btn-danger">{{ trans('admin/message.mail_test_title') }}</button>
      </div>

    </div>


  </div>

</div>
</div>

@include("admin.sys.modules.email_send_test")
@endsection


